3.852 \(\int \frac{\left (-a+b x^n\right )^p \left (a+b x^n\right )^p}{x} \, dx\)

Optimal. Leaf size=72 \[ -\frac{\left (a^2-b^2 x^{2 n}\right ) \left (b x^n-a\right )^p \left (a+b x^n\right )^p \, _2F_1\left (1,p+1;p+2;1-\frac{b^2 x^{2 n}}{a^2}\right )}{2 a^2 n (p+1)} \]

[Out]

-((-a + b*x^n)^p*(a + b*x^n)^p*(a^2 - b^2*x^(2*n))*Hypergeometric2F1[1, 1 + p, 2
 + p, 1 - (b^2*x^(2*n))/a^2])/(2*a^2*n*(1 + p))

_______________________________________________________________________________________

Rubi [A]  time = 0.179056, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167 \[ -\frac{\left (a^2-b^2 x^{2 n}\right ) \left (b x^n-a\right )^p \left (a+b x^n\right )^p \, _2F_1\left (1,p+1;p+2;1-\frac{b^2 x^{2 n}}{a^2}\right )}{2 a^2 n (p+1)} \]

Antiderivative was successfully verified.

[In]  Int[((-a + b*x^n)^p*(a + b*x^n)^p)/x,x]

[Out]

-((-a + b*x^n)^p*(a + b*x^n)^p*(a^2 - b^2*x^(2*n))*Hypergeometric2F1[1, 1 + p, 2
 + p, 1 - (b^2*x^(2*n))/a^2])/(2*a^2*n*(1 + p))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 23.5988, size = 73, normalized size = 1.01 \[ \frac{\left (- a + b x^{n}\right )^{p} \left (a + b x^{n}\right )^{p} \left (- a^{2} + b^{2} x^{2 n}\right )^{- p} \left (- a^{2} + b^{2} x^{2 n}\right )^{p + 1}{{}_{2}F_{1}\left (\begin{matrix} 1, p + 1 \\ p + 2 \end{matrix}\middle |{1 - \frac{b^{2} x^{2 n}}{a^{2}}} \right )}}{2 a^{2} n \left (p + 1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((-a+b*x**n)**p*(a+b*x**n)**p/x,x)

[Out]

(-a + b*x**n)**p*(a + b*x**n)**p*(-a**2 + b**2*x**(2*n))**(-p)*(-a**2 + b**2*x**
(2*n))**(p + 1)*hyper((1, p + 1), (p + 2,), 1 - b**2*x**(2*n)/a**2)/(2*a**2*n*(p
 + 1))

_______________________________________________________________________________________

Mathematica [A]  time = 0.110582, size = 73, normalized size = 1.01 \[ \frac{\left (1-\frac{a^2 x^{-2 n}}{b^2}\right )^{-p} \left (b x^n-a\right )^p \left (a+b x^n\right )^p \, _2F_1\left (-p,-p;1-p;\frac{a^2 x^{-2 n}}{b^2}\right )}{2 n p} \]

Antiderivative was successfully verified.

[In]  Integrate[((-a + b*x^n)^p*(a + b*x^n)^p)/x,x]

[Out]

((-a + b*x^n)^p*(a + b*x^n)^p*Hypergeometric2F1[-p, -p, 1 - p, a^2/(b^2*x^(2*n))
])/(2*n*p*(1 - a^2/(b^2*x^(2*n)))^p)

_______________________________________________________________________________________

Maple [F]  time = 0.218, size = 0, normalized size = 0. \[ \int{\frac{ \left ( b{x}^{n}-a \right ) ^{p} \left ( a+b{x}^{n} \right ) ^{p}}{x}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x^n-a)^p*(a+b*x^n)^p/x,x)

[Out]

int((b*x^n-a)^p*(a+b*x^n)^p/x,x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (b x^{n} + a\right )}^{p}{\left (b x^{n} - a\right )}^{p}}{x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)^p*(b*x^n - a)^p/x,x, algorithm="maxima")

[Out]

integrate((b*x^n + a)^p*(b*x^n - a)^p/x, x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{{\left (b x^{n} + a\right )}^{p}{\left (b x^{n} - a\right )}^{p}}{x}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)^p*(b*x^n - a)^p/x,x, algorithm="fricas")

[Out]

integral((b*x^n + a)^p*(b*x^n - a)^p/x, x)

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{\left (- a + b x^{n}\right )^{p} \left (a + b x^{n}\right )^{p}}{x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((-a+b*x**n)**p*(a+b*x**n)**p/x,x)

[Out]

Integral((-a + b*x**n)**p*(a + b*x**n)**p/x, x)

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (b x^{n} + a\right )}^{p}{\left (b x^{n} - a\right )}^{p}}{x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)^p*(b*x^n - a)^p/x,x, algorithm="giac")

[Out]

integrate((b*x^n + a)^p*(b*x^n - a)^p/x, x)